<?php
    class Auth_user extends CI_Model
    {
        public function get_user($username,$password)
        {
            if(!empty($username) AND $password) {
                $this->db->select('*');
                $this->db->from('users');
                $this->db->where('username',$username);
                $this->db->where('password',md5($password));
                $sql = $this->db->get();
                if($sql->num_rows()>0) {
                    $sql = $sql->row();
                    return $sql;
                }
            }            
        }
    }
?>